﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Entities;
using BLL;
namespace Stationery.UC
{
    public partial class UC_MailBox_View : System.Web.UI.UserControl
    {
        BLL_MailBox bll_MailBox = new BLL_MailBox();
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                if (Request.Params["id_mailbox"] != null)
                {
                    string strID = Request.Params["id_mailbox"].ToString();
                    MailBox mailbox = bll_MailBox.Lst_MailBox(bll_MailBox.Get_MailBox(Convert.ToInt64(strID)))[0];
                    ASPxTextBoxSendDate.Text = mailbox.SEND_DATE.ToString("dd/MM/yyyy");
                    ASPxTextBoxFullName.Text = mailbox.FULLNAME;
                    ASPxTextBoxEmail.Text = mailbox.EMAIL;
                    ASPxMemoNote.Text = mailbox.INFORMATION;
                }
            }
        }

        protected void ASPxButtonBack_Click(object sender, EventArgs e)
        {
            Response.Redirect(UtilsURL.mailbox);
        }
    }
}